import request from '@/utils/axios-config'

// 购物车相关API
export function getCartList() {
  return request({
    url: '/admin/shoppingCart/list',
    method: 'get'
  })
}

export function getCartPage(params) {
  return request({
    url: '/admin/shoppingCart/page',
    method: 'get',
    params
  })
}

export function getCartDetail(id) {
  return request({
    url: `/admin/shoppingCart/detail/${id}`,
    method: 'get'
  })
}

export function saveOrUpdateCart(data) {
  return request({
    url: '/admin/shoppingCart/saveOrUpdate',
    method: 'post',
    data
  })
}

export function deleteCart(id) {
  return request({
    url: `/admin/shoppingCart/deleteById/${id}`,
    method: 'delete'
  })
} 